import Vue from 'vue'
import Router from 'vue-router'
import home from '../pages/Home'
import travel from '../pages/Travel'
import selectCity from '../pages/Travel/selectCity'
import path from '../pages/Travel/path.vue'
import login from '../pages/User/login.vue'
import register from '../pages/User/registe.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name:'home',
      component: home,
    },
    {
      path: '/travel',
      component: travel,
      children:[ 
        { 
          path:'',
          name: 'travelIndex',
          component:selectCity,
        },
        { 
          path:'/path',
          name:'path',
          component:path
        }
      ]
    },
    { 
      path:'/login',
      name:'login',
      component:login
    },
    { 
      path:'/register',
      name:'register',
      component:register
    }
  ]
})
